Video coding apparatus

ABSTRACT

In order to enhance the picture quality of a detected area, the present invention provides a video coding apparatus. In the apparatus, a reliability indicative of the degree of coincidence of an area detected by an important area detecting section with a real important area is calculated, and a coding parameter calculating section calculates a coding parameter to be set to the detected area according to the reliability, thereby controlling the picture quality of the detected area. Consequently, a whole image has a coding bit amount which does not break the restrictions of a transmission bit rate, and a larger coding bit amount is assigned to the important area so that a picture quality thereof can be improved and a visibility can be enhanced. In addition, the picture quality is more enhanced if a probability that the detected area might be an important area is higher.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a video coding apparatus for coding avideo signal in a transmission bit rate limited based on a codingparameter.

2. Description of the Related Art

In recent years, a video signal can be transmitted and received througha transmission path and can be stored in storage media because of thedevelopment of communication technology and an improvement in aninfrastructure. In general, the video signal has a large informationamount. In the case in which the video signal is to be transmitted byusing a transmission path having a limited transmission bit rate or thevideo signal is to be stored in storage media having a limited storagecapacity, therefore, a technique for compressing and coding a videosignal is indispensable. As one of methods of compressing and coding avideo signal, there has been proposed an MPEG (Moving Picture ExpertGroup) in which ISO/IEC progresses a standardization, which is atechnique for reducing a redundancy utilizing the time correlation andspatial correlation of a video signal, thereby decreasing theinformation amount of the video signal and carrying out coding to obtaina video signal satisfying a bit rate of a transmission path or a bitrate for recording in storage media.

In the compression and coding of the video signal, the video signal iscoded to have a limited bit rate. For this reason, a coding bit amountto be assigned to one image constituting a video is restricted and thepicture quality of the image is deteriorated according to a transmissionbit rate. In particular, in the case in which the inside of a screen isto be coded uniformly, the picture quality becomes uniform in thescreen, that is, a deterioration in the picture quality also becomesuniform.

For example, video coding in a TV conference will be considered. If auser uniformly codes the inside of the screen although he (she)originally desires that the picture quality of a face portion should bemore excellent than that of a background portion, the picture quality ofthe face portion which is important for the TV conference becomesequivalent to that of the background portion which is not important.Consequently, a video obtained after the coding does not satisfy asubjective picture quality which reflects the user's intention.

In the screen, there are present an important area for the user and anarea which is not important. The user desires that the important areashould have a high visibility. Subsequently, the important area for theuser is defined to be an “important area”, and a face portion that theuser wants to see in the TV conference is set to be the important area,for example.

As a technique capable of carrying out coding to reflect the user'sintension, there has been proposed a method of setting the picturequality of an important area to be more excellent than that of anotherarea. For example, in a method described in ISO/IEC JTC1/SC29/WG11MPEG95/030, an important area is selected from a dynamic image and aquantization value is changed to set the picture quality of theimportant area to be more excellent than that of another area.

In this method, moreover, the selected area is set to have a highpicture quality. In the case in which the important area moves over thescreen, therefore, it is necessary to select the important area at anytime in order to maintain the picture quality of the important area tobe high. Therefore, there can be supposed a method of setting a detectedimportant area to have a high picture quality by utilizing detectingmeans for automatically detecting the important area.

Examples of this method include an image compressing and codingapparatus (hereinafter referred to as a conventional example) describedin JP-A-10-23432. In the conventional example, a prestored pattern andan input image are matched to give a high picture quality to an areawhich is coincident with the pattern.

A method according to the conventional example will be described below.FIG. 8 is a block diagram showing the conventional example. In FIG. 8, acompressing and coding apparatus 5001 is constituted to have a motionestimating section 5002, a DCT (Discrete Cosine Transform) section 5003,a quantizing section 5004, a variable-length coding section 5005, aheader adding section 5006, a decoding section 5007, a priority codingspecifying section 5008, a code amount comparing section 5009 and acoding parameter determining section 5010.

Description will be given to the operation of the compressing and codingapparatus having the structure described above. An input image is codedon a macro block unit constituted by 16×16 pixels. The motion estimatingsection 5002 compares the similarities of a reference image and an inputimage which are output from the decoding section 5007 which will bedescribed below, thereby calculating a differential value from an areahaving a high similarity. The output of the motion estimating section5002 has two modes. The two modes include a mode 1 for outputting thedifferential value and a mode 2 for exactly outputting an input. Thesemodes are determined by the coding parameter determining section 5010which will be described below.

The DCT section 5003 orthogonally transforms an image output from themotion estimating section 5002 and outputs the result of thetransformation to the quantizing section 5004. The quantizing section5004 divides an orthogonal transformation coefficient output from theDCT section 5003 by a quantization value output from the codingparameter determining section 5010 which will be described below, andoutputs a result to the variable-length coding section 5005. Thevariable-length coding section 5005 variable-length codes the result ofquantization which is output from the quantizing section 5004, andoutputs the variable-length coded result to the header adding section5006.

The header adding section 5006 adds a necessary header to a code outputfrom the variable-length coding section 5005 and outputs a coded videosignal to the decoding section 5007 and the outside, and outputs thegenerated code amount to the code amount comparing section 5009. Thedecoding section 5007 decodes the coded video signal output from theheader adding section 5006, and outputs a reference image to the motionestimating section 5002. The code amount comparing section 5009 comparesa predetermined target code amount with the generated code amount outputfrom the header adding section 5006, and outputs a remainder code amountto be the difference to the coding parameter determining section 5010.

The priority coding specifying section 5008 compares a prestored patternwith a similarity to the input image. If a degree of coincidence isequal to or more than a certain threshold, an instruction for prioritycoding is output to the coding parameter determining section 5010. Thecoding parameter determining section 5010 determines a quantizationvalue and a motion estimating mode by using the remainder code amountoutput from the code amount comparing section 5009, outputs thequantization value to the quantizing section 5004 and outputs the motionestimating mode to the motion estimating section 5002.

For example, if the remainder code amount is small, the mode 1 using adifferential value is set or the quantization value is increased todecrease the generated code amount. To the contrary, if the remaindercode amount is large, the mode 2 using an input image is set or thequantization value is decreased to increase the generated code amount.In the case in which the instruction for priority coding is output fromthe priority coding specifying section 5008, the mode 2 using an inputimage is set or the quantization value is decreased to carry out controlsuch that a large code amount is assigned to a macro block to which theinstruction for priority coding is given. Thus, it is possible toenhance a picture quality by assigning a large code amount to the macroblock to which the instruction for priority coding is given.

However, precision in the detection of an important area is not always100%. For this reason, the detected area is not completely coincidentwith a real important area and is shifted from the real area orcompletely gets out of the real area in some cases. In these cases, apicture quality in the detected area is enhanced, resulting in areduction in the visibility of the real important area which gets out ofthe detected area.

Moreover, the priority coding specifying section 5008 detects an areawhich is coincident with the important area by a certain threshold ormore and carries out a constant enhancement in the picture qualityirrespective of the degree of the coincidence with the important area.Therefore, the effects of the enhancement in the picture quality arecommitted to threshold setting. For example, in the case in which thethreshold is small, a constant enhancement in the picture quality iscarried out even in an image having a low degree of coincidence, thatis, an area having a low probability of the important area so that thecode amount is used wastefully. For this reason, it is impossible toassign a large code amount to the important area in which a picturequality is to be originally enhanced, thereby improving the picturequality.

To the contrary, in the case in which the threshold is great, a constantenhancement in a picture quality is carried out only for an image whichis completely coincident with a pattern, resulting in a reduction in aprobability that the picture quality of the important area will beenhanced. On the other hand, a picture quality is deteriorated in animportant area which has a high probability of the important area anddoes not satisfy the threshold.

If a constant enhancement in the picture quality is carried out for onlythe area having the degree of the coincidence with the important areawhich is equal to or higher than the threshold irrespective of thedegree of the coincidence, an enhancement in the picture quality cannotbe performed according to the degree of the coincidence and thevisibility of the important area is deteriorated in some cases. Theenhancement in the picture quality according to the degree of thecoincidence implies that the picture quality is more enhanced with anincrease in the degree of the coincidence with the important area.

In this specification, hereinafter, a degree of coincidence of thedetected area with the real important area is defined to be a“reliability” and a high reliability implies that a probability of thedetected area to be the real important area is high, that is, precisionin detection is high.

SUMMARY OF THE INVENTION

The invention has been made to solve the conventional problems and hasan object to provide a video coding apparatus wherein the picturequality of a detected area can be enhanced in the case in which thisarea is an original important area, and furthermore, the picture qualityof the important area can be maintained to some extent also in the casein which the detected area does not include the original important area,thereby ensuring a visibility without breaking restrictions for coding avideo signal in a limited transmission bit rate.

The present invention provides a video coding apparatus for coding avideo signal based on a coding parameter for setting a coding bitamount, the apparatus including important area detecting means fordetecting, as an important area, a specific area in a displayed image bythe video signal for which a preset high visibility is required; andcoding parameter calculating means for calculating a coding parameter inthe area detected by the important area detecting means; wherein theimportant area detecting means calculates a reliability indicative ofprecision in a detection result of the specific area and calculates acoding parameter of the detected area depending on a value of thereliability which is calculated by the important area detecting means.

According to the invention, an important area in the screen isautomatically selected and the coding parameter of the automaticallyselected important area is changed to set a coding bit amount to belarger than that in another area, for example. Thereby, for example, itis possible to enhance the picture quality of the selected area.

Further, in the video coding apparatus, a coding parameter on an outsideof a detected area is calculated such that a value is gradated asgrowing away from the detected area from the coding parameter of thedetected area as depending on the value of the reliability.

According to the invention, the coding parameter of a portion which isnot detected to be the important area is also set stepwise. Even if thedetection error of the important area is made, therefore, the setting iscarried out such that the picture quality of the area is notdeteriorated extremely. Moreover, the coding parameter of the detectedarea is set according to the reliability of the detection. In the caseof the important area having a high reliability, for example, such acoding parameter as to enhance the picture quality is set so as tosequentially deteriorate a picture quality in an area which has a lowreliability and is not the important area.

The present invention also provides the video coding apparatus, whereinthe coding parameter calculating means greatly controls a degree of adecrease in a quantization value of the area detected by the importantarea detecting means if a reliability of important area detection of theimportant area detecting means is high, and slightly controls the degreeof the decrease in the quantization value of the detected area if thereliability is low, thereby calculating a quantization value as a codingparameter.

According to the invention, in an area having a higher possibility ofthe important area, a quantization value to be a coding parameter isdecreased and a larger code amount is assigned to an area detected bythe important area detecting means. Consequently, the picture quality ofthe detected area can be enhanced. Namely, a deterioration in a screenin an area having a higher reliability and a higher probability of animportant area is reduced more considerably to enhance a picture qualitydepending on a detection reliability. Moreover, the degree of thereduction in the deterioration in the screen is more decreased in anarea having a lower reliability and a lower probability of the importantarea. Also in the case in which a detection result is deviated from areal important area, consequently, it is possible to prevent the picturequality of a detection error portion from being extremely deterioratedin the real important area.

The present invention further provides, the video coding apparatus,wherein the coding parameter calculating means greatly controls a degreeof an increase in a screen update rate of the area detected by theimportant area detecting means if a reliability of important areadetection of the important area detecting means is high, and slightlycontrols the degree of the increase in the screen update rate of thedetected area if the reliability is low, thereby calculating the screenupdate rate as a coding parameter.

According to the invention, in an area having a higher reliability and ahigher probability of the important area, the coding is carried out suchthat a screen update rate is set to be higher and the motion of theimportant area is carried out smoothly. To the contrary, in an areahaving a lower reliability and a lower probability of the importantarea, the degree of an increase in a screen update rate is sequentiallyreduced to prevent the smoothness of the motion from being extremelydeteriorated in the detection error portion of the real important areaalso in the case in which the detection result is deviated from the realimportant area.

The present invention provides the video coding apparatus, wherein thecoding parameter calculating means greatly controls a degree of anincrease in a frame skipping threshold of the area detected by theimportant area detecting means if a reliability of important areadetection of the important area detecting means is high, and slightlycontrols the degree of the increase in the frame skipping threshold ofthe detected area if the reliability is low, thereby calculating theframe skipping threshold as a coding parameter.

According to the invention, in an area having a higher reliability and ahigh probability of the important area, the coding is carried out toprevent a coding skip so as to maintain the smoothness of the motionalso when a band is insufficient in the coding. Moreover, in an areahaving a lower reliability and a lower probability of the importantarea, the coding skip is more carried out than that in the case of ahigh reliability. Also in the case in which the band is insufficient andthe detection result is deviated from the real important area, thus, thesmoothness of the motion in the detection error portion of the realimportant area can be prevented from being extremely deteriorated.Namely, according to the invention, in an area having a higherpossibility of the important area, a frame skipping threshold to be acoding parameter is more increased and a larger code amount is assignedto an area detected by the important area detecting means. Consequently,the picture quality of the detected area can be enhanced.

The present invention further provides the video coding apparatus,wherein the coding parameter calculating means sets a prefilter otherthan the area detected by the important area detecting means to be a lowpass filter having a high cut-off frequency if a reliability ofimportant area detection by the important area calculating means ishigh, and sets the prefilter other than the detected area to be a lowpass filter having a low cut-off frequency if the reliability is low,thereby calculating, as a coding parameter, a prefilter for removing ahigh frequency component of the video signal.

According to the invention, in an area having a higher possibility ofthe important area, a stronger low pass filter is provided for theoutside of the detected area to reduce high frequency information and tosave the code amount, thereby assigning a larger code amount to thedetected area, resulting in an enhancement in a picture quality. Also inthe case in which a reliability is low and the detected area is shiftedfrom a real important area, moreover, a prefilter corresponding to thereliability is set. Therefore, the setting can be prevented from beingcarried out such that the coding bit amount of a detection error area inthe real important area is extremely decreased.

The present invention also provides the video coding apparatus furtherincluding preprocessing means, wherein the coding parameter calculatingmeans setting, as a detected area, an area cut out of an image displayedby the video signal if a reliability of important area detection by theimportant area detecting means is high, and sets an area to be cut outas a large area including surroundings of the detected area if thereliability is low, thereby calculating, as a coding parameter, a cutoutsize of the area to be cut out, and wherein the preprocessing meanscutting out a specific area of the image displayed by the video signalor adjusting a cutout area in the displayed image based on the cutoutsize calculated as the coding parameter.

According to the invention, the important area is automatically cut outand a size thereof is automatically adjusted properly, for example, soas to be seen easily, and the cutout area which is thus adjustedautomatically is coded such that a picture quality is higher than thatin another area. Moreover, in an area having a higher possibility of theimportant area, a cutout size to be a coding parameter is reduced and alarger code amount is assigned to an area detected by the important areadetecting means. Consequently, the picture quality of the detected areacan be enhanced.

Additionally, according to the invention, when a reliability is higherand a probability of the important area is higher, the important area iscut out faithfully, and is more enlarged and coded. Also in the case inwhich the reliability is low and precision in the detection of theimportant area is low, an area including the surroundings of thedetected area is cut out. Therefore, the detection error portion in thereal important area can be prevented from being protruded from thecutout area and the important area is cut out, enlarged and coded.

The present invention further provides the video coding apparatus,wherein the coding parameter calculating means sets a degree of sizecorrection of the area detected by the important area detecting means tobe low if a reliability of important area detection by the importantarea detecting means is high, and sets the degree of the size correctionof the detected area to be high if the reliability is low, therebycalculating, as a coding parameter, an area correcting parameter forchanging a size of the detected area.

According to the invention, in an area having a higher possibility ofthe important area, an area detected by the important area detectingmeans is enlarged and corrected based on an area correcting parameter tobe a coding parameter and a larger code amount is assigned to thedetected area. Consequently, the picture quality of the detected areacan be enhanced.

Additionally, according to the invention, the picture quality of thearea including the surroundings of the detected area is enhanced. Alsoin the case in which the precision in the detection of the importantarea is low and the real important area is shifted from the detectedarea, therefore, the picture quality of the area including the importantarea is enhanced.

The present invention provides the video coding apparatus, wherein thecoding parameter calculating means sets a degree of size correction ofthe area detected by the important area detecting means to be low if areliability of important area detection by the important area detectingmeans is high, and sets the degree of the size correction of thedetected area to be high if the reliability is low, thereby calculating,as a coding parameter, an area correcting parameter for changing a sizeof the detected area.

According to the invention, in an area having a higher reliability and ahigher probability of the important area, a picture quality is enhancedand cutout and enlargement are carried out to improve a visibility. Inthe case in which the reliability is low, the probability of theimportant area is low and the detected area is shifted from the realimportant area, moreover, only an enhancement in the picture quality iscarried out and the detection error portion in the real important areacan be prevented from being protruded from the cutout area due to thecutout.

The present invention also provides the video coding apparatus, whereinthe coding parameter calculating means sets a coding mode of the areadetected by the important area detecting means into picture priority ifa size of a specific area detected by the important area detecting meansis large, and sets the coding mode of the detected area into motionpriority if the size of the specific area is small, thereby calculatingthe coding mode as a coding parameter.

According to the invention, in the case in which the important area hasa motion, a coding mode is set into motion priority. In the case inwhich the important area has no motion, the coding mode is set intopicture quality priority. Thus, the important area having the motion issmoothly moved and the picture quality of the important area having nomotion is enhanced. Namely, according to the invention, in the case inwhich the important area is small and a deterioration in the picturequality is less remarkable depending on the size of the important area,the motion has priority over the picture quality and the coding iscarried out such that the motion is smoothly performed. In the case inwhich the important area is large and the deterioration in the picturequality is more remarkable, moreover, the picture quality has priorityover the motion and the coding is carried out such that a suitablevisibility for the size of the important area is maintained to be high.

Furthermore, the present invention provides a program for causing acomputer to execute coding of a video signal based on a coding parametersetting a coding bit amount, the computer being caused to function as:

(1) important area detecting means for detecting, as an important area,a preset specific area in a display image by the video signal for whicha high visibility is required, and calculating a reliability indicativeof precision in a detection result of the specific area; and

(2) coding parameter calculating means for calculating a codingparameter of the detected area corresponding to a value of thereliability thus calculated.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing an example of a structure according toa first embodiment of a video coding apparatus according to theinvention,

FIG. 2 is a flow chart showing a flow of a video coding processingaccording to the first embodiment of the invention,

FIG. 3 is a diagram showing an example of the result of detection of animportant area according to the first embodiment of the invention,

FIG. 4 is a diagram showing an example of an area dividing map accordingto the first embodiment of the invention,

FIG. 5 is a conceptual view for explaining a frame skipping decisionaccording to a second embodiment of the invention,

FIG. 6 is a conceptual view for explaining a cutout reduction processingaccording to a fourth embodiment of the invention,

FIG. 7 is a conceptual view showing an example of cutout areacalculation according to the fourth embodiment of the invention, and

FIG. 8 is a block diagram showing an example of the structure of aconventional video coding apparatus.

In the figures, a reference numeral 1 refers to a video codingapparatus; 102 to an input section; 103 to a preprocessing section; 104to a motion compensating section; 105 to a DCT section; 106 to aquantizing section; 107 to a variable-length coding section; 108 to adecoding section; 109 to an important area detecting section; 110 to acoding parameter calculating section; 111 to a code amount controlsection; 401 to an area dividing map; 402 to a small block; 601 to areduced image 1; 602 to a reduced image 2; 603 to a reduced image 3; 701to an important area; 702 to a cutout area; and 710 to an input image.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

An embodiment of the invention will be described below with reference tothe drawings.

First Embodiment

FIG. 1 is a block diagram showing a structure according to a firstembodiment of a video coding apparatus of the invention. The videocoding apparatus 1 according to the embodiment is constituted to have apreprocessing section 103 for carrying out a prefilter processing for aninput video and a preprocessing to cut out a video on a small blockunit, a motion compensating section 104 having three kinds of operationmodes for predicting and compensating the motion of a video input fromthe preprocessing section 103, a DCT section 105 for orthogonallytransforming (discrete cosine transforming) a differential value outputwhich is input from the motion compensating section 104 or a videosignal itself, a quantizing section 106 for carrying out a processing ofquantizing data in a frequency area transformed orthogonally by the DCTsection 105, a variable-length coding section 107 for carrying outvariable-length coding to assign a code having a different lengthcorresponding to the occurrence probability of a value at the same timethat the data quantized by the quantizing section 106 are run-lengthlength coded, a decoding section 108 for decoding the data quantized bythe quantizing section 106, an important area detecting section 109 fordetecting an important area in which a visibility in an input video isenhanced, a coding parameter calculating section 110 for determining themotion compensating mode of the motion compensating section 104 and aquantization coefficient in the quantizing section 106, and a codeamount control section 111 for controlling the code amount of thevariable-length coding section 107 through the coding parametercalculating section 110 based on a shift of the target value of the codeamount from an actual accumulated value, and an input section 102 forinputting a video signal to the preprocessing section 103 and theimportant area detecting section 109 is connected to an output section112 for outputting a coding video signal generated in thevariable-length coding section 107. The video coding apparatus 1 servesto code a video signal in a determined transmission bit rate.

FIG. 2 is a flow chart showing a flow of a processing for a video signalin the video coding apparatus 1. The video coding apparatus 1sequentially executes a video input processing of inputting a videosignal in a step 201, an important area detection processing ofdetecting an important area in a step 202, a coding parametercalculation processing of calculating a coding parameter in a step 203,a preprocessing of preprocessing an input image in a step 204, a videocoding processing of coding a video signal in a step 205, a videodecoding processing of decoding the decoded video signal in a step 206,and an end decision processing in a step 207, and the processings of thesteps 201 to 207 are repeated until the processing is decided to beended.

Next, an operation according to the embodiment will be described. In theprocessing of inputting a video in the step 201, first of all, the inputsection 102 detects a synchronous signal from a video signal and outputsan image constituting the video signal to the preprocessing section 103and the important area detecting section 109 for one screen. In theimportant area detection processing in the step 202, next, the importantarea detecting section 109 detects an area having a high correlationbetween image data for one screen input from the input section 102 andprestored image data such as an average face image, for example. Bysetting an area having the highest correlation to be an important area,then, a result of the detection and a reliability (Reliability) to be acorrelation value are output to the coding parameter calculating section110.

FIG. 3 is a diagram showing an example of the result of the detection ofthe important area detecting section 109. For example, in the case inwhich a rectangular area is output as the result of the detection, fourvalues including coordinates (cx, cy) of a center of gravity in theimportant area and a radius (rx, ry) in horizontal and verticaldirections from the center of gravity are output. A method of outputtingthe result of the detection in the important area detecting section 109is not restricted thereto but any output method capable of specifying anarea can also be used. A method of detecting the important area is notrestricted to the use of a correlation value between the images. It isalso possible to use any method capable of calculating area detectionand a reliability representing precision in the detection.

In the coding parameter calculation processing of calculating a codingparameter in the step 203, the coding parameter calculating section 110calculates a coding parameter by using the area information andreliability of the important area output from the important areadetecting section 109 and an assigned code amount output from the codeamount control section 111 which will be described below. First of all,the coding parameter calculating section 110 divides one screen into twoareas including a high picture quality area and a low picture qualityarea by using the result of the detection of the important area.

FIG. 4 is a diagram showing an example of the area division. A smallblock 402 corresponds to a square block of 16×16 pixels and has four DCTblocks of 8×8 pixels collected. An area dividing map 401 corresponds toone frame. A shading portion represents a result of the detectionobtained by the important area detecting section 109.

A group of the small block 402 including the result of the detection isset to be a high picture quality area and other areas are set to be lowpicture quality areas. In the area dividing map 401, the small block 402having a value of 1 is set to be that in the high picture quality areaand the small block 402 having a value of 0 is set to be that in the lowpicture quality area.

Next, the coding parameters of the high picture quality area and the lowpicture quality area are calculated. In the embodiment, a quantizationvalue is set to be the coding parameter to be calculated.

The quantization values in the high picture quality area and the lowpicture quality area are calculated in three procedures which will bedescribed below in detail.

(1) Description will be given to the calculation of assignment codeamounts to the small blocks 402 in the high picture quality area and thelow picture quality area. A method of calculating assignment codeamounts A_(H) and A_(L) to each of the small blocks 402 in the highpicture quality area and the low picture quality area by using anassignment code amount Bi of an image i output from the code amountcontrol section 111 which will be described below are expressed inequations (1.1) and (1.2). In the equation (1.1), A_(H) represents anaverage assignment code amount of the small block 402 in the highpicture quality area, N represents the number of small blocks in oneframe, and a represents an assignment scale factor which is a factor forincreasing the assignment of a code amount to the high picture qualityarea. In the equation (1.2), N_(H) represents the number of small blocksin a selected area and N_(L) represents the number of small blocks onthe outside of the selected area. In the equation (1.3), “reliability”represents a reliability to be a decimal fraction of 0 to 1, and βrepresents a weighting factor having a positive value.

$\begin{matrix}{A_{H} = {\frac{B_{i}}{N}*\alpha}} & (1.1) \\{A_{L} = {\frac{B_{i} - {A_{H}*N_{H}}}{N_{L}}*\alpha}} & (1.2)\end{matrix}$α=(1+reliability*β)  (1.3)

The coding parameter calculating section 110 calculates an assignmentcode amount to the small block 402 in each of the high picture qualityarea and the low picture quality area by using the equations (1.1) and(1.2). If the reliability “reliability” is higher, the assignment scalefactor α is more increased. Therefore, the assignment code amount to thehigh picture quality area can be increased.

(2) Description will be given to the calculation of a quantizationvalue. After the assignment code amounts to the high picture qualityarea and the low picture quality area are set, the quantization valuesin the small blocks 402 are calculated in accordance with the respectiveassignment code amounts. A method of calculating a quantization value isexpressed in an equation (1.9). In the equation (1.9), Q_(H) representsa quantization value in the high picture quality area, A_(H) representsan assignment code amount in a small area belonging to the high picturequality area, Q_(L) represents a quantization value in the low picturequality area, A_(L) represents an assignment code amount in a small areabelonging to the low picture quality area, and f(x) represents afunction of returning a quantization value to a code amount x and hassuch a property as to return a smaller quantization value when the codeamount is more increased. In the equation (1.9), Q_(H) and Q_(L) arerepresented by Q_(n) and A_(H) and A_(L) are represented by A_(n).Q _(n)=ƒ(A _(n))  (1.9)

The coding parameter calculating section 110 calculates a quantizationvalue in each of the high picture quality area and the low picturequality area in accordance with the equation (1.9). As described above,the coding parameter calculating section 110 calculates the areadividing map 401 and the quantization value of the small block 402 ineach of the high and low picture quality areas, and outputs, to thequantizing section 106, the area dividing map 401 and each of thequantization values which are thus calculated.

In the preprocessing of preprocessing an input image in the step 204,the preprocessing section 103 carries out a necessary preprocessing forthe case in which an instruction is given from the coding parametercalculating section 110 to image data output from the input section 102,and outputs the image data thus processed to the motion compensatingsection 104. The following two preprocessings are carried out. Morespecifically, there are (1) a prefilter processing of providing a lowpass filter over an input image, thereby removing the high frequencycomponent of the image and easily carrying out coding, and (2) a cutoutprocessing of cutting out a partial or whole area of the input image andcarrying out a reduction processing to perform an adjustment to a codedimage size when an input image size is larger than the coded image size.While neither of both processings is not carried out in the embodiment,they are performed in other embodiments which will be described below.

Moreover, a part of the input image is thus cut out and is subjected tothe reduction processing. As compared with a method of reducing thewhole input image, consequently, it is possible to produce the visualeffects of enlarged display. For example, it is supposed that the inputimage size is 4CIF (704×576 pixels) and the coded image size is QCIF(176×144 pixels). In this case, a QCIF image created by cutting out apart of the input image (352×288 pixels) and reducing the same inputimage to ½ can have double visual effects of the enlarged display ascompared with a QCIF image created by reducing the whole input image to¼.

In the video coding processing of coding a video signal in the step 205,the video signal is divided into blocks of 8×8 pixels, and DCT andreverse DCT processings are carried out for each block and a motionprediction, a motion compensation processing, a quantization processing,a reverse quantization processing and a variable-length codingprocessing are carried out for each small block 402 to be a group of 2×2blocks. In each processing block, moreover, when the processings of allthe blocks or all the small blocks 402 in one frame are ended, theresults of the processings are output to a next processing block.

More specifically, the motion compensating section 104 searches for anarea having a high correlation by using image data for one frame inputfrom the preprocessing section 103 and a reference image to be a lastdecoded image on a time basis which is output from the decoding section108 which will be described below, subtracts a reference image of anarea having the highest correlation from an original image to calculatea prediction error, and outputs the prediction error to the DCT section105. Moreover, a motion vector to an area used for the prediction isoutput to the variable-length coding section 107 and the decodingsection 108. At the beginning of the coding, a decoded image is notpresent one frame before. Therefore, the motion compensation is notcarried out.

The DCT section 105 carries out the discrete cosine transformation (DCT)for the prediction error output from the motion compensating section 104to calculate a DCT coefficient and to output the DCT coefficient to thequantizing section 106. The quantizing section 106 carries out aquantization processing by using the DCT coefficient input from the DCTsection 105, the area dividing map 401 input from the coding parametercalculating section 110, and the quantization values in the high and lowpicture quality areas. The quantizing section 106 obtains the attributeof each small block 402 (the high picture quality and low picturequality areas) with reference to the area dividing map 401. By using aquantization value according to the attribute, a division is carried outover the DCT coefficient to obtain a quotient. Thus, the quantized DCTcoefficient is calculated and the area dividing map 401, thequantization values in the high and low picture quality areas and thequantized DCT coefficient are output to the variable-length codingsection 107 and the decoding section 108.

The variable-length coding section 107 carries out variable-lengthcoding over the quantization value output from the quantizing section106, the quantized DCT coefficient, and a motion vector output from themotion compensating section 104, and outputs a variable-length code tothe output section 112 and outputs a generated code amount to the codeamount control section 111.

The code amount control section 111 calculates an assignment code amountto a next frame by using the generated code amount output from thevariable-length coding section 107 and outputs the assignment codeamount to the coding parameter calculating section 110. There will bedescribed a method of calculating an assignment code amount to a frame iby using equations (1.10) and (1.11).

In the embodiment, the code amount control is carried out in apredetermined number of frames and a collection unit of the code amountcontrol will be referred to as GOP. In the equation (1.10), B_(GOP)represents an assignment code amount of 1GOP in the code amount control,T represents a transmission bit rate, N_(GOP) represents the number offrames in the 1GOP, and Framerate represents a frame rate. In theequation (1.11), B_(i) represents a code amount to be assigned to aframe i and b_(j) represents a code amount generated in a frame j.

$\begin{matrix}{B_{GOP} = \frac{T*N_{GOP}}{Framerate}} & (1.10) \\{B_{GOP} = \frac{B_{GOP} - {\sum\limits_{j = 1}^{i - 1}{bj}}}{N_{GOP} - \left( {i - 1} \right)}} & (1.11)\end{matrix}$

A unit of a video to be coded is referred to as a picture. One pictureis constituted on one frame unit or one field unit of an original image.The picture includes three kinds of pictures I, P and B by an imagereferring method and a code amount for each picture is varied.

In the video decoding processing in the step 205, the decoding section108 multiplies the DCT coefficient by the quantization value of anattribute corresponding to each small block 402 (high and low picturequality areas) by using the area dividing map 401, the quantizationvalues and the quantized DCT coefficients in the high and low picturequality areas which are output from the quantizing section 106, therebycalculating a reverse quantized DCT coefficient. Next, a reverse DCT iscarried out over the reverse quantized DCT coefficient to calculate aprediction error after the decoding. By using the motion vector outputfrom the motion compensating section 104, furthermore, a reference areais calculated from a reference frame stored in an internal memory andthe reference area is added to the prediction error to calculate acurrent decoded image. Then, the current decoded image is output to themotion compensating section 104 and the internal memory is replaced withthe decoded image.

The video coding apparatus 1 repeats the processings from the step 201to the step 207 to carry out video coding. In the end decisionprocessing of the step 207, the case in which the input of a videosignal is stopped in the input section 102 is decided to be a coding endand the coding processing is thus ended.

The video coding apparatus 1 according to the embodiment comprises theimportant area detecting section 109 for automatically detecting animportant area in a screen and the coding parameter calculating section110 for calculating a quantization value corresponding to a reliabilityrepresenting detection precision. Consequently, the coding parametercalculating section 110 more increases a code amount assignment to thedetected area and more decreases the quantization value when a detectionreliability for the detected area is high. Therefore, it is possible tomore enhance a picture quality at such a degree that an area having ahigh probability of an important area is automatically adapted to theprobability. Also in the case in which the reliability is low and a realimportant area is deviated from a result of the detection, moreover, itis possible to prevent the picture quality of a detection error areafrom being extremely deteriorated in the real important area.

While a uniform value is used in each area for the code amountassignment to the small block 402 in each of the inside and outside ofthe selected area in the embodiment, it is also possible to carry outthe code amount assignment corresponding to the degree of complexity ofthe small block 402 as in general code amount control.

Additionally, in order to perform a computer as the described videocoding apparatus of this embodiment, a program, which is applicable to acomputer, is also proposed.

The program is utilized for causing a computer to execute coding of avideo signal based on a coding parameter setting a coding bit amount,the computer being caused to function as important area detecting meansfor detecting, as an important area, a preset specific area in a displayimage by the video signal for which a high visibility is required, andcalculating a reliability indicative of precision in a detection resultof the specific area; and coding parameter calculating means forcalculating a coding parameter of the detected area corresponding to avalue of the reliability thus calculated.

Second Embodiment

Next, description will be given to a second embodiment of the videocoding apparatus according to the invention. Since the structure of thevideo coding apparatus according to the embodiment is the same as thatof the first embodiment shown in FIG. 1, the structure of each portionhaving the same structure will be omitted and reference will be made tothe drawings used in the first embodiment. An video coding apparatus 1according to the embodiment also codes a video signal in a determinedtransmission bit rate, and comprises a motion compensating section 104,an important area detecting section 109 for automatically detecting animportant area in a screen, and a coding parameter calculating section110 for calculating an image update rate corresponding to a reliabilityrepresenting detection precision.

Next, the embodiment will be described. In the embodiment, operationsother than those of the coding parameter calculating section 110 and themotion compensating section 104 are the same as those in the firstembodiment. Therefore, two functional blocks having different operationswill be described below.

The coding parameter calculating section 110 according to the embodimentcarries out-an area division in the same manner as in the firstembodiment by using a detection result and a detection reliability whichare output from the important area detecting section 109, therebycalculating an image update rate for each area.

In the procedure for calculating the image update rate in the codingparameter calculating section 110 according to the embodiment, (1) thesame processing as the calculation of an assignment code amount to asmall block 402 in each of a high picture quality area and a low picturequality area in the coding parameter calculating section 110 accordingto the first embodiment is carried out to calculate each assignment codeamount, and an image update rate in each of the high and low picturequality areas is calculated by using the same value. For this reason,when the assignment code amount in each of the high and low picturequality areas is determined, a screen update rate is calculated for thecalculation of the image update rate of the coding parameter calculatingsection 110 according to the embodiment in accordance with theassignment code amount. Before the calculation of the screen updaterate, the quantization value of a frame i is calculated in accordancewith an equation (2.1). In the equation (2.1), Q_(i) represents aquantization value of the frame i, B_(i) represents an assignment codeamount of the frame i, N represents the number of small blocks in aframe, and ƒ(x) represents a function of returning a quantization valueto the code amount in the same manner as in the equation (1.9).Q _(i)=ƒ(B _(i) /N)  (2.1)

It is assumed that a common value is used for the quantization values inthe high and low picture quality areas. An example of a method ofcalculating a screen update rate is expressed in an equation (2.2). Inthe equation (2.2), fps_(n) represents a screen update rate in the highpicture quality area, A_(H) represents an assignment code amount of thesmall block 402 in the high picture quality area, fps_(L) represents ascreen update rate of the low picture quality area, A_(L) represents anassignment code amount of the small block 402 in the low picture qualityarea, and g(x, q) represents a function of returning the screen updaterate to a code amount x and a quantization value q and has such aproperty as to return a high screen update rate when the code amount xis large and the quantization value q is great.fps _(H) =g(A _(H) , Q _(H))fps _(L) =g(A _(L) , Q _(L))   (2.2)

When the screen update rates in the high and low picture quality areasare calculated in accordance with the equation (2.2), the screen updaterate in the high picture quality area is more increased if a detectionreliability is higher.

As described above, the coding parameter calculating section 110calculates an area dividing map 401 and the quantization value of eachsmall block 402 of the high and low picture quality areas, and outputs,to a quantizing section 106, the area dividing map 401 and eachquantization value which are thus calculated. Furthermore, the codingparameter calculating section 110 decides whether coding is carried outor not in accordance with the image update rate thus calculated. If thecoding is not carried out, a coding skip signal is output to the motioncompensating section 104.

With reference to the screen update rates of the high and low picturequality areas, the coding parameter calculating section 110 decides thatthe coding is to be carried out for an area in which the screen updaterate is equal to an input frame rate. To the contrary, when the screenupdate rate is different from the input frame rate, it is decided thatthe coding is to be carried out only when the following equation (2.3)is true. For an area in which it is decided that the coding is notcarried out, a coding skip signal and the area dividing map 401 areoutput to the motion compensating section 104.

In the equation (2.3), i represents a value of a frame counter, x mod yrepresents a remainder obtained by dividing x by y, fps_(input)represents an input frame rate and fps_(n) represents a screen updaterate. The coding parameter calculating section 110 increases the framecounter by 1 after the output of data.

$\begin{matrix}{\left\lbrack {i\mspace{14mu}{mod}\mspace{14mu}\left( \frac{{fps}_{input}}{{fps}_{n}} \right)} \right\rbrack = 0} & (2.3)\end{matrix}$

Referring to the small block 402 of a picture quality area to which aninstruction for a coding skip is given from the coding parametercalculating section 110, the motion compensating section 104 initializesthe input image of the corresponding small block 402 to zero withreference to the area dividing map 401 and outputs the input image to aDCT section 105. Consequently, the area to which the instruction for thecoding skip is given is brought into such a state that a screen is notupdated.

According to the embodiment, there are provided the important areadetecting section for automatically detecting an important area in ascreen and the coding parameter calculating section 110 for increasingthe screen update rate of a detected area if a detection reliability ishigh for the detected area. Consequently, it is possible to obtain animage having a high screen update rate and a smooth motion at such adegree that an area having a high probability of the important area isautomatically adapted to the probability. Also in the case in which thereliability is low and a detection result is deviated from a realimportant area, moreover, it is possible to prevent the smoothness ofthe motion from being extremely deteriorated in the detection errorportion of the real important area.

While the example in which each screen update rate is calculated fromthe assignment code amounts of the high and low picture quality areashas been described in the embodiment, it is not restricted to the use ofthe assignment code amount. In video coding in a low bit rate,particularly, the residual amount of a virtual buffer and a frameskipping threshold in the coding are generally used to carry out acoding skip processing without coding the small block 402 or the frame.Thus, the video coding apparatus 1 sets the frame skipping threshold tocarry out the coding skip processing. As a result, the screen updaterate can be varied. By utilizing the screen update rate, the frameskipping threshold is obtained for each of the high and low picturequality areas and is compared with a generated code amount for eacharea. Thus, the coding skip processing is carried out for each area.

FIG. 5 is a conceptual view showing a frame skipping decision. Thevirtual buffer is provided in the video coding apparatus 1 and serves tomeasure the temporal transition of a code amount in the video codingapparatus 1. The code amount in the video coding apparatus 1 isincreased every time an video is input and coded, and is decreased byoutputting a code from the video coding apparatus 1 to a transmissionpath at a constant rate per unit time.

A graph in FIG. 5 represents the temporal transition of the residualamount of the virtual buffer. Every time a video is input and coded(which will be hereinafter referred to as a coding timing), the codeamount is increased so that the residual amount is decreased, and a codeis output from the buffer at a constant rate so that the residual amountis increased at a constant rate. In each coding timing, it is decidedwhether the coding is carried out or not (the frame skipping decision)depending on the residual amount of the virtual buffer. A value to beused in the frame skipping decision is a frame skipping threshold. InFIG. 5, in a coding timing d, the residual amount of the virtual bufferis equal to or smaller than the frame skipping threshold. Therefore, itis decided that the coding is not carried out. For this reason, theresidual amount is not decreased in the coding timing d.

Third Embodiment

Next, description will be given to a third embodiment of the videocoding apparatus according to the invention. Since the structure of thevideo coding apparatus according to the embodiment is the same as thatof the first embodiment shown in FIG. 1, the structure of each portionhaving the same structure will be omitted and reference will be made tothe drawings used in the first embodiment. A video coding apparatus 1according to the embodiment also codes a signal in a determinedtransmission bit rate, and comprises a preprocessing section 103 forpreprocessing an input video signal, an important area detecting section109 for automatically detecting an important area in a screen, and acoding parameter calculating section 110 for calculating the strength ofthe prefilter of the preprocessing section 103 provided on the outsideof an important area corresponding to a reliability representingdetection precision.

Next, an operation according to the embodiment will be described. In theembodiment, operations other than those of the preprocessing section 103and the coding parameter calculating section 110 are the same as thosein the first embodiment. Therefore, two functional blocks havingdifferent operations will be described below.

The coding parameter calculating section 110 according to the embodimentcreates an area dividing map 401 in the same manner as described in thefirst embodiment by using a detection result and a detection reliabilitywhich are output from the important area detecting section 109,calculates the quantization values of a high picture quality area and alow picture quality area according to the reliability and outputs themto a quantizing section 106. Furthermore, the coding parametercalculating section 110 calculates the strength of the prefilter to beprovided over the low picture quality area by using the detectionreliability, and outputs the area dividing map 401 and the strength ofthe prefilter to the preprocessing section 103.

In the preprocessing section 103 according to the embodiment, asmoothing filter is used for the prefilter and the strength of thefilter is set to be the number of taps of the smoothing filter. Morespecifically, a prefilter having a tap number M serves to replace amedian pixel value of (2M+1)×(2M+1) pixels with an average value of the(2M+1)×(2M+1) pixels. The prefilter is not restricted to the smoothingfilter but any filter can be used.

A method of calculating the strength of the prefilter is expressed inthe following equation (3.1). In the equation (3.1), T_(n) representsthe number of taps of the prefilter for a small block n, A_(L)represents an assignment code amount of the low picture quality area,and h(x) represents a function of returning the number of taps to a codeamount x and returning a smaller number of taps for a larger codeamount. In accordance with the equation (3.1), the number of taps to bethe strength of the prefilter is calculated and is output as thestrength of the prefilter to the preprocessing section 103.T _(n) =h(A _(n))  (3.1)

The preprocessing section 103 carries out a filtering processing for aninput image output from an input section 102 by using the area dividingmap 104 output from the coding parameter calculating section 110 andprefilters having various strengths.

As described above, it is assumed that a smoothing filter is used forthe filtering processing of the preprocessing section 103 according tothe embodiment. The preprocessing section 103 carries out a processingof replacing the average value of the (2M+1)×(2M+1) pixels with themedian pixel, in which a filter strength=a tap number is set to be M fora pixel in the low picture quality area, and outputs image data to amotion compensating section 104 after the filtering.

In the filtering processing of the preprocessing section 103, thus, whena smoothing filter having a larger number of taps is used, the highfrequency component of an image which is reduced by the filtering isincreased and the amount of a code generated after the coding is alsodecreased so that a blurred image is obtained. In the coding parametercalculating section 110, moreover, when the detection reliability isincreased, an assignment code amount to the low picture quality area isdecreased. Based on the equation (3.1), therefore, the prefilterstrength is set to be great and a higher frequency component is removedfrom the low picture quality area so that the code amount can bereduced.

According to the embodiment, the coding parameter calculating section110 sets, to the preprocessing section 103, a prefilter which isstronger against the surrounding low picture quality area if thedetection reliability of an important area which is obtained by theimportant area detecting section 109 is higher. Consequently, if aprobability of the important area is higher, areas other than theimportant area are caused to have a more blurred picture quality so thatthe code amount can be reduced. Thus, it is possible to intensivelyassign a code amount to an area having a high probability of theimportant area, thereby enhancing the picture quality. Also in the casein which the reliability is low and the detected area is shifted from areal important area, moreover, it is possible to prevent a detectionerror portion in the real important area (this portion also has a highreliability to some extent) from becoming an extremely blurred image,thereby suppressing a deterioration in the picture quality on theoutside of the important area.

Fourth Embodiment

Next, description will be given to a fourth embodiment of the videocoding apparatus according to the invention. Since the structure of thevideo coding apparatus according to the embodiment is the same as thatof the first embodiment shown in FIG. 1, the structure of each portionhaving the same structure will be omitted and reference will be made tothe drawings used in the first embodiment. A video coding apparatus 1according to the embodiment also codes a video signal in a determinedtransmission bit rate, and comprises a preprocessing section 103, animportant area detecting section 109 for automatically detecting animportant area in a screen, and a coding parameter calculating section110 for calculating the cutout size of the important area from an inputimage corresponding to a reliability representing detection precision.

Next, an operation according to the embodiment will be described. Sinceoperations other than those of the coding parameter calculating section110 and the preprocessing section 103 according to the embodiment arethe same as those in the first embodiment, two functional blocks havingdifferent operations will be described below.

In the embodiment, moreover, it is supposed that the size of an imageinput from an input section 102 is 4CIF (704×576 pixels) and a codingsize is QCIF (176×144 pixels), and the preprocessing section 103 cutsout a part of the input image and carries out a reduction processingover the coding size if necessary.

FIG. 6 is a conceptual view showing the reduction processing in thepreprocessing section 103. In FIG. 6, it is supposed that the inputimage size is 4CIF and the coding size is QCIF. A reduced image 601 isobtained by cutting out and reducing a whole input image 610, a reducedimage 602 is obtained by cutting out and reducing an area 1 portion fromthe input image 610, and a reduced image 603 is obtained by cutting outand reducing an area 2 portion from the input image 610. By comparisonof these reduced images 601 to 603, the reduced image 603 having thegreatest cutout size is enlarged most greatly.

The coding parameter calculating section 110 according to the embodimentcalculates the cutout area of an input image by using a detection resultand a detection reliability which are output from the important areadetecting section 109, and outputs cutout area information to thepreprocessing section 103.

FIG. 7 is a conceptual view showing cutout area calculation. In FIG. 7,an input image 710 is an image having W_(in)=704 and H_(in)=756, animportant area 701 is a detected area output from the important areadetecting section 109, and a cutout area 702 is a cutout area calculatedby the coding parameter calculating section 110 which has a size ofH_(cut)×W_(cut) pixels and satisfies an equation (4.1) to maintain anaspect ratio.W_(in):H_(in)=W_(cut):H_(cut)  (4.1)

A method of calculating a cutout size corresponding to a reliability isexpressed in the following equations (4.2) to (4.5). The equation (4.2)serves to adapt the important area 701 to the aspect ratio of the inputimage 710. In the equation (4.2), rx represents a radius in a horizontaldirection of the important area 701, ry represents a radius in alongitudinal direction of the important area 701, W_(in) represents ahorizontal size of the input image 710, H_(in)represents a longitudinalsize of the input image 710, W_(orig) represents a horizontal sizeobtained by correcting the aspect ratio of the important area 701, andH_(orig) represents a longitudinal size obtained by correcting theaspect ratio of the important area 701. In the equation (4.3), γrepresents an enlargement ratio of the important area 701, α representsa weighting factor having a positive value and Reliability represents adetection reliability having a positive value of 1 or less. Inaccordance with the equation (4.3), when the reliability Reliability islower, the enlargement ratio γ is higher.

In the equation (4.4), γ_(max) defines an upper limit of the enlargementratio. It is assumed that γ calculated by the equation (4.4) does notexceed γ_(max). In the equation (4.5), W_(cut) represents a horizontalsize of the cutout area 702 and H_(cut) represents a longitudinal sizeof the cutout area 702, and the respective sizes of the detected areasare multiplied by the enlargement ratio.

$\begin{matrix}\begin{matrix}{{if}\mspace{14mu}\left( {\frac{rx}{ry} \geq \frac{W_{in}}{H_{in}}} \right)\mspace{14mu}{then}} & {{W_{orig} = {2 \times {rx}}},{H_{orig} = {W_{orig} \times \frac{H_{in}}{W_{in}}}}} \\{else} & {{H_{orig} = {2 \times {ry}}},{W_{orig} = {H_{orig} \times \frac{W_{in}}{H_{in}}}}}\end{matrix} & (4.2) \\{\gamma = \left( {1 + \frac{\alpha}{Reliability}} \right)} & (4.3) \\{\gamma_{\max} = \frac{W_{in}}{W_{orig}}} & (4.4)\end{matrix}$W _(cut) =W _(orig) ×γ, H _(cut) =H _(orig)×γ  (4.5)

As described above, the coding parameter calculating section 110according to the embodiment calculates, as the cutout area 702, a largerarea than the important area 701 to be the detection result if thedetection reliability is lower, and outputs center-of-gravitycoordinates (cx, cy) and the horizontal and longitudinal sizes H_(cut)and W_(cut) to the preprocessing section 103. Moreover, the codingparameter calculating section 110 calculates the quantization value of ahigh picture quality area in the same manner as in the first embodiment,and outputs, to a quantizing section 106, an area dividing map 401having all values of 1, that is, the area dividing map 401 having awhole screen to be the high picture quality area and the quantizationvalue.

The preprocessing section 103 carries out a reduction processing suchthat an area having the center-of-gravity coordinates (cx, cy) and thehorizontal and longitudinal sizes H_(cut) and W_(cut) in the cutout area702 which are output from the coding parameter calculating section 110has a coding size to be cut out of the input image 710 output from theinput section 102, and outputs a reduced image to a motion compensatingsection 104.

According to the embodiment, the coding parameter calculating section110 sets the size of the important area 701 cut out of the input image710 to be smaller when the detection reliability of the important area701 which is obtained by the important area detecting section 109 ishigher. In the coding parameter calculating section 110, therefore, anenlargement ratio can be more increased to carry out the coding. In thecase in which the detection reliability is low, moreover, the area to becut out of the input image 710 is set to be larger than the detectedimportant area 701. In the case in which a detection ratio is low,consequently, it is possible to reduce a possibility that the realimportant area 701 might leak out of the cutout area 702 even if adetection result is deviated from the real important area 701, forexample. Thus, it is possible to produce enlargement effects without theinfluence of a detection ratio.

Fifth Embodiment

Next, description will be given to a fifth embodiment of the videocoding apparatus according to the invention. Since the structure of thevideo coding apparatus according to the embodiment is the same as thatof the first embodiment shown in FIG. 1, the structure of each portionhaving the same structure will be omitted and reference will be made tothe drawings used in the first embodiment. A video coding apparatus 1according to the embodiment also codes a video signal in a determinedtransmission bit rate, and comprises a preprocessing section 103 forpreprocessing an input video, an important area detecting section 109for automatically detecting an important area 701 in a screen, and acoding parameter calculating section 110 for calculating the enlargementcorrection ratio of the important area 701 from an input image 710corresponding to a reliability representing detection precision.

Next, an operation according to the embodiment will be described. In thevideo coding apparatus 1 according to the embodiment, operations otherthan those of the coding parameter calculating section 110 and thepreprocessing section 103 are the same as those in the first embodimentshown in FIG. 1. Therefore, two functional blocks having differentoperations will be described below.

The coding parameter calculating section 110 according to the embodimentcorrects the size of the important area 701 corresponding to the valueof a reliability by using a detected area and a detection reliabilitywhich are output from the important area detecting section 109, therebycalculating a high picture quality area. The reason why the size of theimportant area 701 is corrected is that there is a possibility that areal important area might be shifted from the detected important area ifthe reliability is low. In this case, if the detected area is set to bethe high picture quality area, the real important area is set to be alow picture quality area so that the real important area cannot beenhanced in a picture quality. In the embodiment, if the value of thereliability is small, the detected area is enlarged corresponding to thevalue, thereby correcting the area.

A method of calculating the enlargement ratio of area correction isexpressed in the following equation (5.1). In the equation (5.1), γrepresents an enlargement ratio of an area, α represents an enlargedweighting factor having a positive value and Reliability represents areliability. In accordance with the equation (5.1), the enlargementratio of an area is set to be higher if the reliability is lower. In anequation (5.2), γ_(max) represents an upper limit of the enlargementratio, W_(in) represents a horizontal size of the input image 710 and rxrepresents a radius in a horizontal direction of the detected importantarea 701, and it is assumed that the enlargement ratio γ does not exceedγ_(max). In an equation (5.3), rx′ represents a radius in a horizontaldirection of the important area 701 which is obtained after theenlargement and correction, ry′ represents a radius in a longitudinaldirection of the important area 701 which is obtained after theenlargement and correction, and ry represents a radius in a longitudinaldirection of the detected important area 701.

$\begin{matrix}{\gamma = \left( {1 + \frac{\alpha}{Reliability}} \right)} & (5.1) \\{\gamma_{\max} = \frac{W_{in}}{2 \times {rx}}} & (5.2)\end{matrix}$rx′=rx×γ, ry′=ry×γ  (5.3)

The coding parameter calculating section 110 enlarges and corrects thedetected important area 701 in accordance with the equations (5.1) to(5.3) and then sets a high picture quality area constituted by a smallblock 402 including the important area 701 obtained after the correctionin the same manner as in the first embodiment, thereby correcting anarea dividing map 401. Furthermore, the coding parameter calculatingsection 110 calculates a quantization value for each of high and lowpicture quality areas in the same manner as in the first embodiment, andoutputs the area dividing map 401 and the quantization values in thehigh and low picture quality areas to a quantizing section 106. Thepreprocessing section 103 carries out a reduction processing over theinput image 710 based on cutout area information output from the codingparameter calculating section 110 and outputs a reduced image to amotion compensating section 104.

According to the embodiment, the coding parameter calculating section110 enlarges and corrects the detected important area 701 more greatlyif the detection reliability is lower. Also in the case in whichdetection precision is low, consequently, it is possible to enhance thepicture quality of the real important area 701 irrespective of thedetection precision. Also in the case in which a probability of theimportant area 701 is low, accordingly, the picture quality of the realimportant area 701 is not deteriorated erroneously but can be enhanced.

Sixth Embodiment

Next, description will be given to a sixth embodiment of the videocoding apparatus according to the invention. Since the structure of thevideo coding apparatus according to the embodiment is the same as thatof the first embodiment shown in FIG. 1, the structure of each portionhaving the same structure will be omitted and reference will be made tothe drawings used in the first embodiment. A video coding apparatus 1according to the embodiment also codes a video signal in a determinedtransmission bit rate, and comprises an important area detecting section109 for automatically detecting an important area 701 in a screen, and acoding parameter calculating section 110 for deciding whether theimportant area 701 is cut out of an input image 710, a quantizationvalue is weighted and is thus calculated or they are combinedcorresponding to a reliability representing detection precision.

Next, an operation according to the embodiment will be described. Sinceoperations other than the operation of the coding parameter calculatingsection 110 of the video coding apparatus 1 according to the embodimentare the same as those in the fourth embodiment, a functional blockhaving a different operation will be described below. In the presentembodiment, moreover, it is supposed that the size of the input image710 is 4CIF (704×576 pixels) and a coding size is QCIF (176×144 pixels),and a preprocessing section 103 cuts out a part of the input image 710and carries out a reduction processing over the coding size ifnecessary.

The coding parameter calculating section 110 decides whether theimportant area 701 is cut out or different quantization values arecalculated between high and low picture quality areas by using adetection result and a reliability which are output from the importantarea detecting section 109, and outputs cutout area information thuscalculated to the preprocessing section 103, and furthermore, outputs anarea dividing map 401 and the quantization values of the high and lowpicture quality areas to a quantizing section 106.

The coding parameter calculating section 110 sets the reliability to bea criterion and cuts out and codes the important area 701 if thereliability is equal to or higher than a certain threshold, andsimultaneously sets the important area into the high picture qualityarea and sets the quantization value to be smaller than that in the lowpicture quality area. To the contrary, in the case in which thereliability is lower than the threshold, the important area 701 is notcut out but the important area is set into the high picture quality areaand the quantization value is set to be smaller than that in the lowpicture quality area.

In the embodiment, it is assumed that a method of cutting out theimportant area 701, that is, calculating a cutout area 702 is the sameas that of the fourth embodiment and a larger area than the importantarea 701 is set to be the cutout area 702 if the reliability is lower.Moreover, it is assumed that a method of setting a high picture qualityarea and a method of calculating the quantization values of the high andlow picture quality areas are the same as those in the first embodimentand a smaller quantization value is set if the reliability is higher.

According to the embodiment, as described above, the coding parametercalculating section 110 cuts out the important area 701 and enhances apicture quality if the detection reliability is higher than a certainthreshold. Thus, the important area 701 can be more enlarged so that thepicture quality can be enhanced. To the contrary, if the reliability islow, the cutout is not carried out but only an enhancement in thepicture quality is performed. Also in the case in which detectionprecision is low, consequently, the visibility of the important area 701can be maintained to be high and the coding can be thus carried out.Accordingly, it is possible to maintain the visibility of the importantarea 701 to be high without the influence of the detection precision.

Seventh Embodiment

Next, description will be given to a seventh embodiment of the videocoding apparatus according to the invention. Since the structure of thevideo coding apparatus according to the embodiment is the same as thatof the first embodiment shown in FIG. 1, the structure of each portionhaving the same structure will be omitted and reference will be made tothe drawings used in the first embodiment. A video coding apparatus Iaccording to the embodiment also codes a video signal in a determinedtransmission bit rate, and comprises an important area detecting section109 for automatically detecting an important area 701 in a screen, and acoding parameter calculating section 110 for changing a coding prioritymode corresponding to the size of a detected area.

Next, an operation according to the embodiment will. be described. Inthe embodiment, operations other than the operation of the codingparameter calculating section 110 according to the third embodiment arethe same as those in the second embodiment. Therefore, a functionalblock 110 having a different operation will be described below. Thecoding parameter calculating section 110 according to the embodimentselects a coding priority mode by using a detection result and areliability which are output from the important area detecting section109 and calculates a coding parameter in accordance with the prioritymode.

In the embodiment, the coding priority mode supposes (1) a motionpriority mode, that is, a coding mode for causing a reduction in ascreen update spacing to have priority over an enhancement in a picturequality and giving priority to a motion smoothness, and (2) a picturequality priority mode, that is, a coding mode for causing theenhancement in the picture quality to have priority over the reductionin the screen update spacing and for giving priority to the picturequality of a screen.

The decision of the priority mode in the coding parameter calculatingsection 110 is carried out by using a ratio of the size of the importantarea 701 to that of an input image 710. In the case in which the size ofthe important area 701 is smaller than that of the input image 710, adeterioration in the picture quality of the small area is lessremarkable. In order to enhance the visibility of an image, therefore,priority is more effectively given to the motion smoothness than thepicture quality. To the contrary, in the case in which the size of theimportant area 701 is greater than that of the input image 710, adeterioration in the picture quality of the large area is moreremarkable. In order to enhance the visibility of the image, therefore,priority is more effectively given to the picture quality than themotion.

Accordingly, the coding parameter calculating section 110 sets thepicture quality priority mode if the size of the important area 701 isequal to or larger than a certain threshold, and sets the motionpriority mode if the size of the important area 701 is smaller than thecertain threshold. Thus, a coding parameter is calculated. A thresholdto be used in the coding mode decision is set to be ½ of the input image710, for example, and is not restricted thereto but any value can beused.

Prior to the decision of the priority mode, the coding parametercalculating section 110 sets a high picture quality area to calculate anarea dividing map 401 in the same manner as in the first embodiment byusing a detection result output from the important area detectingsection 109.

A method of calculating a coding parameter in each of the coding modeswill be described below.

(1) In the picture quality priority mode, the coding parametercalculating section 110 decides that the picture quality priority modeis set if the size of the important area 701 is equal to or larger thana half of the size of the input image 710. If the size of the importantarea 701 is more increased, the quantization value of the important area701 is set to be smaller and a whole screen update spacing is set to begreater. In the embodiment, a horizontal size is used for the size ofthe important area 701 and this is not restricted, and any valuerepresenting a size can be used.

A method of calculating the quantization value of the important area 701and the screen update spacing is expressed in the following equation(7.1). In the equation (7.1), rx represents a radius in a horizontaldirection of the important area 701, W_(in) represents a horizontal sizeof the input image 710, and δ represents a ratio of a horizontal size tothe input image 710 of the important area 701 which has a valueincreased if the size of the important area 701 is increased and has amaximum value of 1.0. In an equation (7.2), A_(H) represents anassignment code amount to a high picture quality area which iscalculated by the equation (1.1), f(x) represents the same function asthat of the equation (1.9) and has such a feature as to return a smallervalue if x is greater, and Q_(H) represents a quantization value of thehigh picture quality area and is set to be small if the size ratio δ ofthe important area 701 is high. In an equation (7.3), A_(L) representsan assignment code amount to a low picture quality area which iscalculated by the equation (1.2) and Q_(L) represents a quantizationvalue of the low picture quality area. In an equation (7.4), g(a, q)represents the same function as that of the equation (2.2) and has sucha feature as to return a greater value if a and q are greater. fpsrepresents a screen update rate which is common to the high and lowpicture quality areas.

$\begin{matrix}{\delta = \frac{2 \times {rx}}{W_{in}}} & (7.1)\end{matrix}$Q _(H) =f(A _(H)×(1+δ))  (7.2)Q _(L) =f(A _(L))  (7.3)fps=g(A _(H) , Q _(H))  (7.4)

By using the equations (7.1) to (7.4), the quantization values of thehigh and low picture quality areas and the common screen update rate arecalculated. More specifically, when the size of the important area 701is greater, the quantization value of the high picture quality area isset to be smaller by the equation (7.2) so that a picture quality can bemaintained to be high. Moreover, the quantization value is set to besmall. Therefore, the screen update rate is correspondingly set to besmall in accordance with the equation (7.4).

(2) In the motion priority mode, the coding parameter calculatingsection 110 decides that the motion priority mode is set if the size ofthe important area 701 is smaller than a half of the size of the inputimage 710. If the size of the important area 701 is more increased, theimage update rate of the important area 701 is set to be higher and awhole quantization value is set to be smaller. In the embodiment, ahorizontal size is used for the size of the important area 701 and thisis not restricted, and any value representing a size can be used.

A method of calculating the quantization value of the important area 701and the screen update spacing is expressed in the following equation(7.10). In the equation (7.10), δ represents a ratio of the size of theimportant area 701 which is calculated by the equation (7.1) and hassuch a feature as to be smaller if the size is smaller, A_(H) representsan assignment code amount to a high picture quality area which iscalculated by the equation (1.1), f(x) represents the same function asthat of the equation (1.9.) and has such a feature as to return asmaller value if x is greater, and Q represents a quantization valuewhich is common to the high and low picture quality areas and is set tobe greater if the size ratio δ of the important area 701 is lower. In anequation (7.11), g(a, q) represents the same function as that of theequation (2.2) and has such a feature as to return a greater value if aand q are greater. fps_(H) represents a screen update rate of the highpicture quality area. In an equation (7.12), A_(L) represents anassignment code amount to the low picture quality area which iscalculated by the equation (1.2), and fps_(L) represents a screen updaterate of the low picture quality area.Q _(H) =f(A _(H)×δ)  (7.10)fps _(H) =g(A _(H) ,Q)  (7.11)fps _(L) =g(A _(L) ,Q)  (7.12)

By using the equations (7.10) to (7.12), the quantization value which iscommon to the high and low picture quality areas and the screen updaterate of each of the high and low picture quality areas are calculated.More specifically, when the size of the important area 701 is smaller,the quantization value which is common to the high and low picturequality areas is set to be greater by the equation (7.10). Moreover, thequantization value is set to be greater. Therefore, the screen updaterate of the high picture quality area is correspondingly set to begreater in accordance with the equation (7.11).

As described above, the coding parameter calculating section 110 decidesthe coding priority mode in accordance with the size of the importantarea 701, calculates the area dividing map 401, the quantization valueof each small block 402 of the high and low picture quality areas andthe screen update rate in accordance with the priority mode, andoutputs, to a quantizing section 105, the area dividing map 401 and eachquantization value which are thus calculated.

In the same manner as in the second embodiment, furthermore, the codingparameter calculating section 110 decides whether the coding is carriedout or not in accordance with the calculated image update rate andoutputs a coding skip signal to a motion compensating section 104 if thecoding is not carried out. The coding parameter calculating section 110outputs data and then increases a frame counter by one.

Referring to the small block 402 of a picture quality area to which aninstruction for a coding skip is given from the coding parametercalculating section 110, the motion compensating section 104 initializesthe input image 710 of the corresponding small block 402 to zero withreference to the area dividing map 401 and outputs the input image 710to a DCT section 105. Consequently, the area to which the instructionfor the coding skip is given is brought into such a state that a screenis not updated.

According to the embodiment, the coding parameter calculating section110 sets the quantization value of the detected important area 701 to besmall if the size of the important area 701 is large and a deteriorationin a picture quality is remarkable. Consequently, the coding to givepriority to the picture quality can be carried out. To the contrary, inthe case in which the size of the important area 701 is small and thedeterioration in the picture quality is less remarkable, the screenupdate rate of the important area 701 is set to be high so that thecoding to give priority to a motion smoothness can be carried out.

Accordingly, a visibility can be maintained to be high corresponding tothe size of the important area 701, thereby carrying out the coding.

The invention is not restricted to the embodiments but may be carriedout based on other various embodiments in respect of specificstructures, functions, actions and effects without departing from thescope thereof. For example, a coding parameter can be obtained bycombining at least two of a quantization value, an update rate, a frameskipping threshold, a prefilter, a cutout size and an area correctingparameter.

As described above in detail, according to the first aspect of theinvention, there is provided the area selecting means capable ofselecting an optional area in a screen by a user. The coding controlmeans changes a coding parameter for the area selected by the user.Consequently, the user can select an area in which a picture quality inthe screen is to be enhanced for a video.

According to the second aspect of the invention, there is provided theimportant area detecting means capable of automatically selecting anarea in which a picture quality in a screen is to be enhanced. A codingparameter is calculated and set by the coding parameter calculatingmeans for the detected area. Consequently, a user does not need tomanually select an important area in the screen for a video. The videocoding apparatus automatically changes the coding parameter of theimportant area so that a picture quality thereof can be enhanced with adistinction from another area and the visibility of the same area can beenhanced.

According to the third aspect of the invention, there is provided theimportant area detecting means capable of automatically selecting anarea in which a picture quality is to be enhanced in a screen. For thedetection result of the detected area, a coding parameter is calculatedand set stepwise by the coding parameter calculating means. Also in thecase in which the important area does not become the detected area,consequently, it is possible to prevent viewing from being disturbed dueto an extreme deterioration in the picture quality.

According to the fourth aspect of the invention, the important areadetecting means calculates a reliability representing precision in adetection result, and the coding parameter calculating means calculatesa coding parameter of a detected area or the outside of the detectedarea corresponding to the value of the reliability calculated by theimportant area detecting means. Consequently, the coding parameter canbe set such that a visibility is more increased in an area having ahigher reliability and a higher probability of an important area. Thus,it is possible to prevent a picture quality in the important area whichdoes not become the detected area from being extremely deteriorated,resulting in an extreme degradation in the visibility of the same area.

According to the fifth aspect of the invention, there is provided thepreprocessing section of cutting out a detected area from an input imageor carrying out an automatic adjustment to have such a size as to beseen easily by using the detection result of the important areadetecting means. Consequently, a user does not need to select animportant area in the input image and can see a coded image having asize adjusted automatically such that the important area can be seeneasily.

According to the sixth aspect of the invention, it is possible to setthe coding bit amount of an area detected by the important areadetecting means corresponding to the reliability of the detected area byusing a quantization value to be a coding parameter calculated by thecoding parameter calculating means.

According to the seventh aspect of the invention, it is possible to setthe coding bit amount of an area detected by the important areadetecting means corresponding to the reliability of the detected area byusing an update rate to be a coding parameter calculated by the codingparameter calculating means.

According to the eighth aspect of the invention, it is possible to setthe coding bit amount of an area detected by the important areadetecting means corresponding to the reliability of the detected area byusing a frame skipping threshold to be a coding parameter calculated bythe coding parameter calculating means.

According to the ninth aspect of the invention, it is possible to setthe coding bit amount of an area detected by the important areadetecting means corresponding to the reliability of the detected area byusing prefilters having various strengths to be coding parameterscalculated by the coding parameter calculating means.

According to the tenth aspect of the invention, it is possible to setthe coding bit amount of an area detected by the important areadetecting means corresponding to the reliability of the detected area byusing a cutout size to be a coding parameter calculated by the codingparameter calculating means.

According to the eleventh aspect of the invention, it is possible to setthe coding bit amount of an area detected by the important areadetecting means corresponding to the reliability of the detected area byusing an area correcting parameter to be a coding parameter calculatedby the coding parameter calculating means.

According to the twelfth aspect of the invention, at least two of thecoding parameters to be calculated corresponding to the value of thereliability by the important area detecting means are combined, forexample, a prefilter and an update rate are combined. Consequently, thechoices of the coding parameter can be increased and the picture qualityof the important area can be enhanced more properly depending on variousmanners of the important area and other areas.

According to the thirteenth aspect of the invention, the codingparameter calculating means determines the coding mode of a detectedarea into motion priority or picture quality priority by using thedetection result of the important area detecting means. Consequently,the important area having a motion can be coded to have the smoothmotion. If the important area has no motion, the coding is carried outto enhance the picture quality. Thus, a visibility can be enhanced.

According to the fourteenth aspect of the invention, the codingparameter calculating means largely controls the degree of a decrease inthe quantization value of a detected area if the value of thereliability of specific area detection is great, and slightly controlsthe degree of a decrease in the quantization value of the detected areaif the reliability is low. Depending on the detection reliability,consequently, a deterioration in a picture quality can be considerablyreduced to obtain an enhancement in the picture quality in an areahaving a higher reliability and a higher probability of an importantarea. Moreover, the degree of a reduction in the deterioration in thepicture quality is decreased in an area having a lower reliability and alower probability of the important area. Also in the case in which adetection result is deviated from a real important area, consequently,it is possible to prevent the picture quality of a detection errorportion in the real important area from being extremely deteriorated.

According to the fifteenth aspect of the invention, the coding parametercalculating means largely controls the degree of an increase in thescreen update rate of a detected area if the reliability of specificarea detection is higher, and slightly controls the degree of anincrease in the screen update rate of the detected area if thereliability is lower. Consequently, the screen update rate can be set tobe higher in an area having a higher reliability and a higherprobability of an important area. Thus, the coding can be carried outsuch that the motion of the important area is automatically performedsmoothly. To the contrary, the degree of an increase in the screenupdate rate can be reduced in an area having a lower reliability and alower probability of the important area. Also in the case in which adetection result is deviated from a real important area, therefore, itis possible to prevent the smoothness of a motion from being extremelyreduced in the detection error portion of the real important area.

According to the sixteenth aspect of the invention, the coding parametercalculating means largely controls the degree of an increase in theframe skipping threshold of a detected area so as to carry out a codingskip with difficulty if the reliability of specific area detection ishigher, and slightly controls the degree of an increase in the frameskipping threshold of the detected area so as to carry out the codingskip more easily than that in the case of the high reliability if thereliability is lower. In an area having a higher reliability and ahigher probability of an important area, thus, a possibility that thecoding skip might be carried out is reduced also in the case in which aband is insufficient in the coding. Therefore, it is possible to carryout the coding by maintaining the smoothness of a motion. In an areahaving a lower reliability and a lower probability of the importantarea, moreover, the possibility that the coding skip might be carriedout is more increased than that in the case of the high reliability.Also in the case in which the band is insufficient and a detectionresult is deviated from a real important area, therefore, the smoothnessof a motion can be prevented from being extremely reduced in thedetection error portion of the real important area.

According to the seventeenth aspect of the invention, depending on thereliability of the detection of an important area, the coding parametercalculating means sets a prefilter other than that in the detected areaof a specific area to be a low pass filter having a higher cut-offfrequency if the reliability is higher and a probability of theimportant area is higher, and sets the prefilter other than that in thedetected area to be a low pass filter having a lower cut-off frequencyif the reliability is lower. In an area having a higher possibility ofthe important area, consequently, a low pass filter having a highercut-off frequency is provided for the outside of the detected area toreduce high frequency information, thereby saving a code amount. Thus,it is possible to assign a larger code amount to the detected area,resulting in an enhancement in a picture quality. Also in the case inwhich the reliability is lower and the detected area is shifted from areal important area, moreover, it is possible to prevent a detectionerror portion in the real important area from becoming an extremelyblurred image.

According to the eighteenth aspect of the invention, the codingparameter calculating means sets an area cut out of an input image to bea detected area if the reliability of the detection of an important areais higher, and sets a size cut out of the input image to be a large areaincluding the surroundings of the detected area if the value of thereliability is smaller. In the case in which the reliability is higherand a probability of the important area is higher, therefore, it ispossible to faithfully cut out, more enlarge and code the importantarea. Also in the case in which the reliability is lower and precisionin the detection of the important area is lower, moreover, the areaincluding the surroundings of the detected area is cut out.Consequently, it is possible to automatically cut out, enlarge and codethe important area without causing a problem that the detection errorportion in the real important area is protruded from the cutout area.

According to the nineteenth aspect of the invention, the codingparameter calculating means sets the size correction of a detected areato be smaller if the reliability of specific area detection is higher,and sets the size correction of the detected area to be greater if thereliability is lower. Also in the case in which precision in thedetection of the important area is lower and a real important area isshifted from the detected area, consequently, the picture quality of anarea including the surroundings of the detected area can be enhanced.Thus, the picture quality of the real important area can be enhancedautomatically.

According to the twentieth aspect of the invention, the coding parametercalculating means sets an area cut out of an input image to be adetected area and decreases the quantization value of the detected areaif the reliability of specific area detection is higher, and does notcut the detected area out of the input image and decreases thequantization value of the detected area if the reliability is lower. Inan area having a higher reliability and a higher probability of animportant area, consequently, it is possible to automatically enhance apicture quality and carry out cutout and enlargement, thereby increasinga visibility. In the case in which the reliability is lower, theprobability of the important area is lower and the detected area isshifted from a real important area, moreover, only an enhancement in apicture quality can be carried out. Consequently, it is possible toprevent a detection error portion in the real important area from beingprotruded from the cutout area by the cutout. Thus, it is possible toautomatically change the type of an enhancement in a visibilitydepending on the reliability.

According to the twenty-first aspect of the invention, the codingparameter calculating means sets the coding mode of a detected area intopicture quality priority if the size of a detected important area islarge, and sets the coding mode of the detected area into motionpriority if the size is small. Depending on the size of the importantarea, consequently, a motion is automatically caused to have priorityover a picture quality if the important area is smaller and adeterioration in the picture quality is less remarkable. Thus, codingcan be carried out with a smooth motion. In the case in which theimportant area is larger and the deterioration in the picture quality ismore remarkable, furthermore, the picture quality is automaticallycaused to have priority over the motion. Consequently, it is possible tocarry out the coding to maintain a high visibility which is suitable forthe size of the important area.

As described above, according to the invention, it is possible toprovide a video coding apparatus wherein the picture quality of adetected area can be enhanced in the case in which this area is anoriginal important area, and furthermore, the picture quality of theimportant area can be maintained to some extent also in the case inwhich the detected area does not include the original important area,thereby ensuring a visibility without breaking restrictions for coding avideo signal in a limited transmission bit rate.

1. A video coding apparatus for coding a video signal based on a codingparameter for setting a coding bit amount, comprising: important areadetecting means for detecting, as an important area, a specific area ina displayed image by the video signal for which a preset high visibilityis required; and coding parameter calculating means for calculating acoding parameter of the area detected by the important area detectingmeans; wherein the important area detecting means calculates areliability indicative of precision in a detection result of thespecific area, the calculated reliability comprising a value of thereliability that represents a degree of the detected area coincidence ofthe important area, and wherein the coding parameter calculating meanscalculates the coding parameter of the detected area depending on thevalue of the reliability which is calculated by the important areadetecting means, and further wherein the coding parameter calculatingmeans calculates the coding parameter of the detected area as a functionof the value of the reliability using an equation that includes thevalue of the reliability.
 2. The video coding apparatus according toclaim 1, wherein a coding parameter on an outside of the detected areais greater than the coding parameter of the detected area and isgradated as growing away from the detected area.
 3. The video codingapparatus according to claim 1, wherein the coding parameter of thedetected area is a quantization value and the coding parametercalculating means calculates a smaller quantization value for thedetected area if the value of the reliability is high, and a largerquantization value for the detected area if the value of the reliabilityis low.
 4. The video coding apparatus according to claim 1, wherein thecoding parameter of the detected area is a screen update rate and thecoding parameter calculating means greatly controls a degree of anincrease in the screen update rate of the detected area if the value ofthe reliability is high, and slightly controls the degree of theincrease in the screen update rate of the detected area if the value ofthe reliability is low.
 5. The video coding apparatus according to claim1, wherein the coding parameter is a frame skipping threshold and thecoding parameter calculating means greatly controls a degree of anincrease in the frame skipping threshold of the detected area if thevalue of the is high, and slightly controls the degree of the increasein the frame skipping threshold of the detected area if the value of thereliability is low.
 6. The video coding apparatus according to claim 1,wherein the coding parameter calculating means sets a prefilter of anarea other than the detected area to be a low pass filter having a highcut-off frequency if the value of the reliability is high and sets theprefilter to be a low pass filter having a low cut-off frequency if thevalue of the reliability is low, thereby calculating, as a codingparameter, a prefilter for removing a high frequency component of thevideo signal.
 7. The video coding apparatus according to claim 1,further comprising preprocessing means, wherein the coding parameter isa cutout size of an area to be cut out of an image displayed by thevideo signal, and the coding parameter calculating means calculates asmaller cutout size if the value of the reliability is high, and alarger cutout size if the value of the reliability is low, and whereinthe preprocessing means cuts out a specific area of the image displayedby the video signal or adjusts a cutout area in the displayed imagebased on the cutout size calculated as the coding parameter.
 8. Thevideo coding apparatus according to claim 1, wherein the codingparameter calculating means sets a degree of size correction of thedetected area to be low if the value of the reliability is high, andsets the degree of the size correction of the detected area to be highif the value of the reliability is low, thereby calculating, as a codingparameter, an area correcting parameter for changing a size of thedetected area.
 9. The video coding apparatus according claim 1, whereinthe coding parameter calculating means sets, as the area detected by theimportant area detecting means, an area to be cut out of an imagedisplayed by the video signal and decreases a quantization value of thedetected area if the value of the reliability is high, and does not cutout the detected area from the image but decreases the quantizationvalue of the detected area if the value of the reliability is smallvalue, thereby calculating the quantization value and cutout areainformation as a coding parameter.
 10. The video coding apparatusaccording claim 1, wherein the coding parameter is a coding mode, andthe coding parameter calculating means sets the coding mode of thedetected area into picture priority if a size of a specific areadetected by the important area detecting means is large, and sets thecoding mode of the detected area into motion priority if the size of thespecific area is small.
 11. A video coding apparatus for coding a videosignal based on a coding parameter for setting a coding bit amount,comprising: an important area detector for detecting an important areain a displayed image of the video signal and calculating a reliabilitythat represents precision in detecting the important area, thecalculated reliability comprising a value of the reliability thatrepresents a degree of the detected area coincidence of the importantarea, wherein the important area is an area requiring a preset highvisibility; and a coding parameter calculator for calculating a codingparameter of the important area based on said reliability, wherein thecoding parameter calculator calculates the coding parameter of theimportant area as a function of the value of the reliability using anequation that includes the value of the reliability.